{extend name="base/common"}

{block name="style"}
    <link href="/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="/admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
{/block}

{block name="page-header"}
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>用户管理</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="index.html">Action</a>
                </li>
                <li class="active">
                    <strong>Index</strong>
                </li>
            </ol>
        </div>
        <div class="col-lg-2">

        </div>
    </div>
{/block}

{block name="main"}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>行为日志</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                <li><a href="#">Config option 1</a>
                                </li>
                                <li><a href="#">Config option 2</a>
                                </li>
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th><input class="i-checks check-all" type="checkbox"></th>
                                    <th>编号</th>
                                    <th>行为名称</th>
                                    <th>执行者</th>
                                    <th>执行时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="_list" id="vo"}
                                    <tr>
                                        <td><input type="checkbox" class="i-checks" name="input[]"></td>
                                        <td>{$vo.id} </td>
                                        <td>{:get_action($vo['action_id'],'title')}</td>
                                        <td>{:get_nickname($vo['user_id'])}</td>
                                        <td><span>{$vo.create_time|time_format}</span></td>
                                        <td><a href="{:Url('Action/edit?id='.$vo['id'])}">详细</a>
                                            <a class="confirm ajax-get" href="{:Url('Action/remove?ids='.$vo['id'])}">删除</a>
                                        </td>
                                    </tr>
                                {/volist}
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="6">
                                        <div class="page">{$_page}</div>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
{/block}

{block name="script"}
<!-- Peity -->
<script src="/admin/js/demo/peity-demo.js"></script>
<script src="/admin/js/plugins/peity/jquery.peity.min.js"></script>
<!-- iCheck -->
<script src="/admin/js/plugins/iCheck/icheck.min.js"></script>

<!-- Sweet alert -->
<script src="/admin/js/plugins/sweetalert/sweetalert.min.js"></script>

<script>
    $(function(){
        $("#action_add").click(function(){
            window.location.href = $(this).attr('url');
        })
    });

    $(document).ready(function(){
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });

        $('.user-delete').click(function () {
            swal({
                title: "你确定要删除吗？",
                text: "你确定要删除这条数据!",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "是的,我要删除!",
                closeOnConfirm: false
            }, function () {
                swal("已经删除!", "你已经删除了这条数据!", "success");
            });

            return false;
        });


    });
</script>

{/block}


